package cn.webestar.scms.gateway.controller;

import cn.webestar.scms.commons.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/")
public class StarterController {

    @Value("${app.version:--}")
    private String version;

    @Value("${app.build.timestamp:--}")
    private String buildTimestamp;

    @GetMapping("/unpapi/svc/info")
    public R<Map<String,String>> svcinfo(){
        Map<String,String> map = new HashMap<>();
        map.put("version",version);
        map.put("buildTimestamp",buildTimestamp);
        return R.success(map);
    }

}
